﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.Entity;
using System.Data.Entity.ModelConfiguration.Conventions;
using IntelFront.Migrations;

namespace IntelFront.Models
{
    public class TheContext : DbContext
    {
        public TheContext() : base("name=AdminDbContext")
        {
            //Database.SetInitializer(new MigrateDatabaseToLatestVersion<TheContext, Configuration>("name=AdminDbContext"));
        }

        public DbSet<User> Users { get; set; }

        public DbSet<Record> Records { get; set; }

        public DbSet<Admin> Admins { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            base.OnModelCreating(modelBuilder);
            //modelBuilder.Conventions.Remove<PluralizingTableNameConvention>();
        }
    }
}
